#include "bsp_beep.h"

void beep_init()
{
    IOMUXC_SetPinMux(IOMUXC_UART1_RTS_B_GPIO1_IO19,0);
    IOMUXC_SetPinConfig(IOMUXC_UART1_RTS_B_GPIO1_IO19,0x10b0);
    GPIO1->GDIR |= 1<<19;
}
void beep_OFF()
{
   GPIO1->DR &= ~(1<<19);
}
void beep_ON()
{
    GPIO1->DR |= 1<<19;
}
void beep_toggle()
{
    static uint8_t flag=0;
    flag=!flag;
    if(flag==1)
    {
        beep_ON();
    }
    else
    {
        beep_OFF();
    }
    
}